<?php


namespace app\api\controller;


use app\common\controller\Api;

class OrderStatement extends Api
{
    protected $noNeedLogin = [''];
    protected $noNeedRight = ['*'];

    /**
     * 账单分页列表(过滤售后单)
     *
     * @param int $page 页码
     * @param int $limit 每页数据
     * @param string $start_time 开始时间
     * @param string $end_time 结束时间
     */
    public function getStatementPageList(\app\common\model\order\OrderStatementModel $OrderStatementModel, \app\api\validate\OrderValidate $OrderValidate)
    {
        $params = $this->request->post();
        if(!$OrderValidate->check($params,[],'getStatementPageList')){
            $this->errorReturn(40001,$params,$OrderValidate->getError());
        }
        $user_id = $this->auth->id;
        $return = $OrderStatementModel->getStatementPageList($params,$user_id);
        $this->errorReturn($return['code'],$return['data'],$return['msg']);
    }
}